// components/privacyPopup/privacyPopup.js
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        bg_title_img:{
            type: String,
            value: getApp().globalData.imagesUrl+'/common/privacy_title_red.png'
        },
        bg_img:{
            type: String,
            value: getApp().globalData.imagesUrl+'/common/privacy_view_red.png'
        }
    },

    /**
     * 组件的初始数据
     */
    data: {
        show:false,
        parentPageInfo:""
    },

    /**
     * 组件的方法列表
     */
    methods: {
        clickRefuse() {
            this.data.parentPageInfo.resolvePrivacyAuthorization({
              event: 'disagree'
            })
            this.setData({
                show:false
            })
        },
        handleAgreePrivacyAuthorization() {
            this.data.parentPageInfo.resolvePrivacyAuthorization({
              buttonId: 'agree-btn',
              event: 'agree'
            })
            this.setData({
                show:false
            })
        },
        show(){
            this.setData({
                show:true
            })
        }, 
        toOpenPrivacyContract(){
            wx.openPrivacyContract({
                success: () => {}, 
                fail: () => {}, 
                complete:() => {}
              })
        }
    }
})
